home *** CD-ROM | disk | FTP | other *** search
- Mapping a file system into the main tree
- Introduction
-
- 11.. PPuurrppoossee
-
- At this point, we are trying to logically connect a file-system (local
- partition or server volume) in the directory tree. It can be anywhere,
-
- It is not uncommon to get the following situation
-
- ╖ You have a large directory, say /home/jack which is getting bigger
- and bigger.
-
- ╖ You are out of disk space.
-
- ╖ You buy a second hard drive, create a single partition on it
- (/dev/hdb1 for example).
-
- ╖ You rename /home/jack to /home/jack.backup
-
- ╖ You map /dev/hdb1 to /home/jack.
-
- ╖ You copy /home/jack.backup to /home/jack.
-
- After that, you may delete /home/jack.backup. You get the same logical
- file layout, but have now some space on the first drive and a lot of
- space for /home/jack to grow on the second drive.
-
- 22.. TTaasskk
-
- To achieve the connection, you have to
-
- ╖ Select a hard drive partition.
-
- ╖ Identify the type of file-system. _E_x_t_2 for _L_i_n_u_x and _U_m_s_d_o_s for DOS
- drive.
-
- ╖ Pick a mount point. It can be any directory or subdirectory.
-
- 33.. GGeenneerraall ooppttiioonnss
-
- The general option are not needed most of the time. They allow for
- increase flexibility and security.
-
- ╖ Read-only
-
- It is possible to protect a partition from writing. Even the
- superuser won't be able to write there. This is seldom use on
- normal hard drive partition though.
-
- ╖ user mountable
-
- This option is generally used with the following one. It is useful
- for removable media. It allows any one to activate the connection
- at any time. Normally, only root (the superuser) can establish a
- mount.
-
- ╖ Not mount at boot time
-
- Especially useful for removable media. It prevent the system from
- trying to establish a mount (and fail) at boot time.
-
- ╖ No program allowed to execute
-
- It is a security feature, especially useful for removable media. If
- you set the uusseerr mmoouunnttaabbllee option on a removable media, it allows
- any user to come and install a set of files specially setup to give
- him full access to your system (administrator privilege).
-
- ╖ No set-user-identifier allowed
-
- Again a security feature. It is a compromise between full access
- and the above option (No execution allowed).
-
- By setting this option, the system will deny privileged program
- their special rights. A privileged program is one that switch the
- user to another identity while it is running (generally root),
- allowing this user to do special tasks only the supervisor can do.
-
- 44.. _(_U_)_M_s_d_o_s aanndd _H_p_f_s ((_O_s_/_2)) ooppttiioonnss
-
- 44..11.. SSeeccuurriittyy ffeeaattuurreess
-
- Both _M_s_-_D_O_S and _O_s_/_2 are single user operating system. Their
- respective file-systems lack most of the features expect from a
- multiuser operating system like _L_i_n_u_x.
-
- For one, there is no file ownership. It would mean that when a _D_o_s
- hard drive is mount into the _L_i_n_u_x file-system tree, files would be
- available to any user on the machine.
-
- Keep in mind that _L_i_n_u_x is a multiuser system. It is fairly easy to
- create user accounts for co-workers on your machine so they can share
- your CPU or system resources. It would not be nice to find out later
- that everyone have access to every personal file you have in your _D_o_s
- partitions.
-
- _L_i_n_u_x offer a neat solution to this. You can logically apply an
- ownership and permission flag to all files and directories in a _D_o_s
- partitions. No special data is written to the partitions. It is simply
- a presentation mode used by _L_i_n_u_x.
-
- Here are the options you can control
-
- ╖ Default user ID
-
- You can assign one owner for every files and directories in the
- file-system. The default owner is root.
-
- ╖ Default group ID
-
- You can assign one group for every files and directories in the
- file-systems. The default group is root.
-
- ╖ Default permissions
-
- You can turn on or off selectively every one of the nine _U_n_i_x style
- permission bits. Permissions bits are expressed as three groups or
- three bits each. Each group has the following layout
-
- ╖ Read access
-
- ╖ Write access
-
- ╖ Execution access
-
- The groups are
-
- ╖ Owner permission bits
-
- ╖ Group permission bits
-
- ╖ Other users (not the owner and not member of the group) permission
- bits.
-
- 44..22.. TTrraannssllaattiioonn mmooddee
-
- Text file are stored in a slightly different format on _M_s_-_D_O_S and
- _O_s_/_2, compared to _U_n_i_x and _L_i_n_u_x. The difference lie in the way end-
- of-file are identified.
-
- _M_s_-_D_O_S use a sequence of two characters, an ASCII CCaarrrriiaaggee--rreettuurrnn
- followed by an ASCII LLiinnee FFeeeedd. _U_n_i_x use only a single LLiinnee FFeeeedd.
-
- The mmssddooss, uummssddooss and hhppffss file-systems share one option to make life
- easier when sharing file on a hard drive between _L_i_n_u_x and _M_s_-_D_O_S or
- _O_S_/_2
-
- Here are the mode available:
-
- ╖ binary
-
- This means no translation at all.
-
- ╖ auto
-
- The translation will be activated on all file except on some file
- with a special extension.
-
- Here are the known binary extensions
-
- ╖ Program code
-
- APP BIN COM DLL DRV EXE LIB OBJ OVL OVR PIF SYS
-
- ╖ Common archivers
-
- ARC ARJ DEB GZ LHA LZH TAR TAZ TGZ TPZ TZ TZP Z ZIP ZOO
-
- ╖ Graphics
-
- BMP GIF GL JPG PCX TIF
-
- ╖ TeX
-
- DVI GF PK PXL TFM VF
-
- ╖ text
-
- The translation will be done on all file. This option should be
- used with care.
-
- Once a translation mode is selected, it is done both at read and write
- time, making this almost transparent to _L_i_n_u_x application.
-
- Please note that the current trend is toward flexible utilities
- (editors) which can handle both format instead of using a file-system
- trick like this one.
-
- 55.. OOtthheerr ooppttiioonnss
-
- New file-systems and file-systems features do appear once in a while.
- These file-systems may have options unknown to _L_i_n_u_x_c_o_n_f.
-
- To cope with this, there is an extra option line. Normally file-system
- option are a bunch of keyword/value pair, separated by a comma.
-
- opt1=val,opt2=none,opt3,opt4=2
-
- 66.. CCoommmmeenntt
-
- You can write anything you want there, maybe some explanation about
- the option combination you have selected.
-
-